package com.itheima.代码练习;
/*
定义"学生"类,Student,包含以下成员:
成员属性:
name (姓名):String类型，
chinese(语文):int类型，
math(数学):int类型，
属性使用private修饰。
 */
public class Student {
    private  String name;
    private  int chinese;
    private  int math;

    public Student() {
    }

    public Student(String name, int chinese, int math) {
        this.name = name;
        this.chinese = chinese;
        this.math = math;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getChinese() {
        return chinese;
    }

    public void setChinese(int chinese) {
        this.chinese = chinese;
    }

    public int getMath() {
        return math;
    }

    public void setMath(int math) {
        this.math = math;
    }
    public void show(){
        System.out.println(name+","+chinese+","+math+"语文和数学成绩的总和:"+(chinese+math));
    }
}
